// JavaScript Document
function checked(){
	setInterval(function(){   
	    $.ajax({
	        type :"get",
	        url:"../server.php",
			data :"check=5",			
	        success : function(table){
	            	$("#"+table).css({"background-color":"red"});
					
	        }
	    });
	},1000);	
	$(".tablenum").live("click",function(){
		id=this.getAttribute("id");			
		$.ajax({
			type:"get",
			url:"../server.php",
			data:"check=6&id="+id,
			success: function(kq){
				$("#"+id).css({"background-color":"green"});				
				$("#kq").html(kq);
				
			}
		});		
	})
	$("#cook_completed").live("click",function(){		
			$("#cook_completed").attr('disabled','disabled');
			$("#cook_completed").html("Đã nấu xong");						
			$.ajax({
			type:"get",
			url:"../server.php",
			data:"check=7&id="+id
			<!--success: function(kq1){							
			<!--	$("#kq").html(kq1);
			<!--}
		});
	})
	
}
